package com.fansl.allround.common.security.exception;

import com.fansl.allround.common.security.component.AllroundAuth2ExceptionSerializer;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Getter;
import org.springframework.security.oauth2.common.exceptions.OAuth2Exception;

/**
 * @author fansl
 * @Description: 自定义OAuth2Exception
 * @date 2019/7/12 10:53
 */
@JsonSerialize(using = AllroundAuth2ExceptionSerializer.class)
public class AllroundAuth2Exception extends OAuth2Exception {
    @Getter
    private String errorCode;

    public AllroundAuth2Exception(String msg) {
        super(msg);
    }

    public AllroundAuth2Exception(String msg,Throwable throwable) {
        super(msg,throwable);
    }

    public AllroundAuth2Exception(String msg,String errorCode) {
        super(msg);
        this.errorCode=errorCode;
    }
}
